package edu.spec.rxz.week08.class2;

public abstract class  Animal {
    private String name;
    private String food;
    private String area;
//默认构造方法
    public Animal() {
    }
//构造方法
    public Animal(String name, String food, String area) {
        this.name = name;
        this.food = food;
        this.area = area;
    }
//成员方法1（抽象方法）
    public abstract String findFood();
//成员方法2
    public String eat() {
        return this.name + "吃" + this.food;
    }
//成员方法3
    abstract String wholelife();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }
}


